<template>
  <div>
      <TopBar></TopBar>
      <div class="msgContentBox" style="margin-top:1.5rem">
        <div class="titleBox vux-1px-b">
          <h2 v-text="item.title"></h2>
          <span v-text="item.fbtime" class="titleTime"></span>
        </div>
        <div v-html="msg" class="msgContent"></div>
      </div>
  </div>
</template>
<script>
import TopBar from '../../component/common/TopBar'
import {getMsgDetail} from '../../../service/getData.js'
import {getSDK} from '../../../service/wxShare.js'

export default {
  components:{
    TopBar
  },
  beforeCreate(){
    getSDK()
  },
  data(){
    return {
      item:this.$route.params.item,
      msg:'',
      id:this.$route.params.item.id
    }
  },
  created(){
    getMsgDetail(this.id)
      .then(res=>{
        //console.log(res)
        if(res.status == 1){
          this.msg = res.info.content
        }
      })
  }
}
</script>
<style lang="less">
  @import '../../../style/mixin.less';
  .msgContentBox{
    .wh(90%,100%);
    margin: 0 auto;
    .titleBox{
      .wh(100%,1.4933rem);
      .fx(column,flex-start);
      .titleTime{
        .sc(0.2667rem,#939393)
      }
    }
    .msgContent{
      padding-top: 0.5333rem;
      .sc(0.3467rem,#939393)
    }
  }
</style>
